/*
 * @Author: your name
 * @Date: 2021-03-15 16:50:28
 * @LastEditTime: 2021-03-16 01:27:53
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \test\vue.config.js
 */
module.exports = {
  // publicPath:'/masterdata/',
  configureWebpack: {
    resolve: {
      alias: {
        'assets': '@/assets',
        'views': '@/views',
        'utils':'@/utils',
        'components': '@/components',
        'network': '@/network',
        'api':'@/api',
        'store':'@/store',
      }
    }
  },
  devServer: {

    proxy: {
      // 服务器
      '/api': {
        target: 'http://42.193.131.98:8080',
        // 允许跨域
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          '^/api': ''
        },
      }
      // 本地
      // '/api': {
      //   target: 'http://192.168.0.108:8080',
      //   // 允许跨域
      //   changeOrigin: true,
      //   ws: true,
      //   pathRewrite: {
      //     '^/api': ''
      //   },
      // }
    }
  }
}
